#ifndef _STRSPLIT_HH_
#define _STRSPLIT_HH_

#include <string>
#include <vector>
#include <limits>

namespace Mage {

/**
 * Takes a string and splits it by delimiter returning a sequence of tokens
 * @param[in] str string to be split
 * @param[in] sep delimiter to be used to split
 * @param[in] max max number of splits required
 * @param[out] out object to write the output of split
 * @return true on success and false on failure
 */
bool strsplit(const std::string& str, std::vector<std::string>& res,
              char sep = '\t',
              std::size_t max = std::numeric_limits<std::size_t>::max());

} // namespace Mage

#endif // _STRSPLIT_HH_
